VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "TestFineMethodNotify"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit

Private mMethod As FineMethodCaller
Private mMethodStart As FineMethodCaller
Private mEndCalled As Boolean
Private mErrorCollection As New Collection

Public Sub testMethodNotify()
givenMethod
whenMethodIsRun
thenStartGivesMethod
thenEndCalled
End Sub


''
''
Private Sub givenMethod()
Set mMethod = New FineMethodCaller
mMethod.init "", Me
End Sub

Private Sub whenMethodIsRun()
mMethod.forward Me
End Sub

Private Sub thenStartGivesMethod()
assert.equals mMethodStart, mMethod, "same method"
End Sub
Private Sub thenEndCalled()
assert.isTrue mEndCalled, "End called"
End Sub

''

'Callbacks
Public Sub StartFineMethod(method As FineMethodCaller)
Set mMethodStart = method
End Sub
Public Sub EndFineMethod()
mEndCalled = True
End Sub

'Dummy callback - ignored
Public Sub forward()
End Sub


Public Function NumOfAsserts() As Long
NumOfAsserts = 2
End Function

